In this assignment, I created two interactive visualizations to show the electricity usage of 3 households.
For the data munging, I first read in all the csv files. Every file has 86400 rows, and each row symbolizes one second usage in that day. It’s hard to visualize every second. Showing usage of each second is not meaningful and too much information can blur the eyes of audiences. I decided to sum the consumption of each hour in a day and group them by weekdays and timeframe (Morning, afternoon, evening and night). The newly generated dataset has 92310 rows.
I created 2 questions before doing the visualizations. Each household has 7 or 8 categories. Entertainment consumptions are what they have in common. My questions are related to this category.
The first question is about the consumption of entertainment of these households by weekdays. During which day of a week do these 3 households have the highest mean of consumption? What can we tell from the behavior of their consumption, like their lifestyles?
The second question is about the consumption of entertainment by different timeframes in a day, like morning, afternoon and night. In this question, I’d like to see the consumption in a more detailed way.
The first visualization is generated by plotly package in python. In this plot, I created a bar plot showing the consumption of entertainment of these 3 households by weekdays. The mean of the consumption is used here.
The second visualizationis created by altair package in python. In this plot, box plots are generated showing the consumption of entertainment in sum by different time frames in a day.